package com.blog.service;

import com.blog.entity.Log;
import com.blog.mapper.LogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
public class LogServiceImpl implements LogService{
    @Autowired
    private LogMapper logMapper;
    @Async
    @Override
    public void insert(Log log) {
        String threadName = Thread.currentThread().getName();
        System.out.println("insert.threadName="+threadName);
        logMapper.insert(log);
    }
}
